// 主要说if let的使用
fn main() {
    let y = Some(6);
    if let Some(value) = plus_one1(y) {
        println!("value = {}", value);
    }

    if let Some(value) = plus_one1(Some(1)) {
        println!("value = {}", value);
    } else {
        println!("Nothing");
    }
}
fn plus_one1(x: Option<i32>) -> Option<i32> {
    match x {
        None => {None}
        Some(x) => {Some(x+1)}
    }
}
